/**
 * Created by on 2016/7/10.
 */

var mysqlmodel 		= require('./../lib/mysqlLogic')
var redismodel 		= require('./../lib/redisLogic')
var articlemodel    = require('./../lib/articleLogic')


var dataType = require('./../models/data_type')
var models = require('./../models/models')

module.exports = function(env) {

   const mysqlserverinfo = require('./../lib/config/mysqlconnection').database[env]
   const rediserverinfo = require('./../lib/config/redisconnection').database[env]


   mysqlmodel.createClient(mysqlserverinfo)
   redismodel.createClient(rediserverinfo)
   articlemodel.createClient(rediserverinfo)


   models.setModel('mysqlmodel',mysqlmodel)
   models.setModel('redismodel',redismodel)
   models.setModel('dataType',dataType)
   models.setModel('articlemodel',articlemodel)
    

};
